﻿using Ninject;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TimberSmart.Desktop
{
    public class Bootstrapper
    {
        private IKernel _kernel;

        public Bootstrapper()
        {
            ConfigureContainer();
        }

        public void Run()
        {
            Application.Run(_kernel.Get<CustomerForm>());
        }

        private void ConfigureContainer()
        {
            _kernel = new Ninject.StandardKernel();

            _kernel.Load(new string[] {
                "TimberSmart.Business.dll",
                "TimberSmart.Data.dll"
            });

            _kernel.Bind<CustomerForm>().To<CustomerForm>();
        }
    }
}
